<?php
/* 
 * Copyright (c) 2018-2021   All rights reserved.
 * 
 * 创建时间：2021-05-27 16:34
 *
 * 项目：upload  -  $  - setHelper.php
 *
 * 作者：liwei 
 */

namespace modules\levpays\helpers;

use Lev;
use lev\helpers\ScoreHelper;

!defined('INLEV') && exit('Access Denied LEV');

class BaselevpaysSet {

    public static function openWxpay() {
        if (PHP_VERSION < '7.0.0') {
            Lev::$app['isAdmin'] && Lev::setNotices('抱歉，PHP7及以上才可以使用微信支付');
            return false;
        }

        return !Lev::stget('openWxpay', 'levpays');
    }

    public static function goodsScores() {
        return Lev::stget('goodsScores', 'levpays');
    }

    public static function tradenoPre()
    {
        $set = Lev::stget('tradenoPre', 'levpays');
        return $set ? strtoupper(substr(trim($set), 0, 1)) : 'T';
    }

    public static function tradePre()
    {
        return substr(trim(Lev::stget('tradePre', 'levpays')), -2);
    }

    public static function getscoretype($tip = '（论坛）') {
        $scoretypes = ScoreHelper::scoretypesyy();
        $scoretypes+= ScoreHelper::scoretypes();
        return $scoretypes;
    }
    public static function setscoretype() {
        //$scoretypes = Lev::actionObjectMethodIden('levyy', 'modules\levyy\table\userHelper', [], 'wealths') ?: [];
        //$scoretypes+= ScoreHelper::scoretypes();
        $scoretypes = ScoreHelper::scoretypesyy();
        return $scoretypes;
    }
}

class levpaysSetHelper extends BaselevpaysSet {
}